<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:DentalGUIHelper="clr-namespace:DentalGUIHelper;assembly=DentalConfig">

  <Style x:Key="MaterialDesignRecoloredPresenter" TargetType="{x:Type DentalGUIHelper:RecoloredPresenter}">
    <Setter Property="Fill" Value="{DynamicResource MaterialDesignBody}"/>
    <Setter Property="ToolTip" Value="{Binding Path=Content.ToolTip, RelativeSource={RelativeSource Self}, FallbackValue=''}"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type DentalGUIHelper:RecoloredPresenter}">
          <Grid Width="{Binding ActualWidth, ElementName=Content}" Height="{Binding ActualHeight, ElementName=Content}" MaxWidth="{TemplateBinding Width}" MaxHeight="{TemplateBinding Height}">
            <Rectangle Fill="{TemplateBinding Fill}">
              <Rectangle.OpacityMask>
                <VisualBrush Stretch="Uniform">
                  <VisualBrush.Visual>
                    <ContentPresenter x:Name="Content" HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding Content}"/>
                  </VisualBrush.Visual>
                </VisualBrush>
              </Rectangle.OpacityMask>
            </Rectangle>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="{x:Type DentalGUIHelper:RecoloredPresenter}" TargetType="{x:Type DentalGUIHelper:RecoloredPresenter}" BasedOn="{StaticResource MaterialDesignRecoloredPresenter}"/>
</ResourceDictionary>
